package service;

import dao.HotelMapper;
import entity.h_complain;
import entity.h_room;
import entity.h_transaction;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class HotelServiceImpl implements HotelService{
    @Resource
    private HotelMapper hotelMapper;

    /**
     *酒店基本信息模糊查询
     */
    public List<h_room> getH_roomAll(Map<String,Object> map) {
        return hotelMapper.getH_roomAll(map);
    }

    /**
     *客房情况模糊查询
     */
    public List<h_room> getRoomsAll(Map<String, Object> map) {
        return hotelMapper.getRoomsAll(map);
    }

    /**
     *交易情况模糊查询
     */
    public List<h_transaction> getTransactionAll(Map<String, Object> map) {
        return hotelMapper.getTransactionAll(map);
    }

    /**
     *投诉情况模糊查询
     */
    public List<h_complain> getComplainAll(Map<String, Object> map) {
        return hotelMapper.getComplainAll(map);
    }

    @Override
    public h_room getRoomById(String id) {
        return hotelMapper.getRoomById(id);
    }

    @Override
    public boolean updateRoom(h_room room) {
        return hotelMapper.updateRoom(room);
    }

    @Override
    public boolean deleteRoomById(String id) {
        return hotelMapper.deleteRoomById(id);
    }

    @Override
    public boolean addRoom(h_room room) {
        return hotelMapper.addRoom(room);
    }
}
